import requests
import json

data = {
    "mobile": "15311484568",
    "password": "123456",
}
encoded_data = json.dumps(data).encode("utf-8")
response = requests.post(
    "http://localhost:5000/login_json",
    data=encoded_data,
    headers={
        'content-type': 'application/json;charset=UTF-8'
    }
)
if response.status_code == 200:
    if len(response.text) > 0:
        emp = json.loads(response.text)
        for k, v in emp.items():
            print(k, '>>>', v)
